home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 February / EnigmA AMIGA RUN 04 (1996)(G.R. Edizioni)(IT)[!][issue 1996-02][Skylink CD III].iso / earcd / program / bgui12.lha / docs / listviewclass.doc < prev    next >
Text File  |  1995-05-17  |  33KB  |  829 lines

  1.  
  2.                File: listviewclass.doc
  3.         Description: Listviewclass documentation.
  4.           Copyright: (C) Copyright 1994-1995 Jaba Development.
  5.                      (C) Copyright 1994-1995 Jan van den Baard.
  6.                      All Rights Reserved.
  7.  
  8. ------------------------------------------------------------------------------
  9.  
  10. TABLE OF CONTENTS
  11.  
  12. listviewclass/--background--
  13. listviewclass/Methods
  14. listviewclass/Attributes
  15.  
  16. listviewclass/--background--                      listviewclass/--background--
  17.  
  18.     NAME
  19.         Class:          listviewclass
  20.         Superclass:     baseclass
  21.         Include File:   <libraries/bgui.h>
  22.  
  23.     FUNCTION
  24.         To  provide   a  gadget  simular to the gadtools.library it's listview
  25.         kind.  The  lisview  class  does  how ever have extended functionality
  26.         like  hooks  for  entry  creation,  entry comparrison, entry and title
  27.         rendering.  Also  a  multi-selection mode is available. Opposed to the
  28.         gadtools  version  this  class does not require the usage  of list and
  29.         nodes.  All  kind  of  data  can  be  added to the listview as entries
  30.         providing that you supply hook routines to handle this data.
  31.  
  32.         Objects  from  this  class  send  out the following attribute pairs in
  33.         their notification events:
  34.  
  35.         GA_ID             - Gadget object ID.
  36.         LISTV_Entry       - Pointer to the selected entry.
  37.         LISTV_EntryNumber - Logical number of the selected entry.
  38.  
  39. listviewclass/Methods                                    listviewclass/Methods
  40.  
  41.     NOTE
  42.         Most  of  the  methods described below can also contain a pointer to a
  43.         GadgetInfo  structure.  This  pointer  does  not have to be valid. All
  44.         actions  will be done only if you want to let the action also be shown
  45.         visually  you  need to pass a valid pointer to a GadgetInfo structure.
  46.  
  47.     NEW METHODS
  48.         LVM_ADDENTRIES -- This  method  can be used to add more than one entry
  49.                 after  the  listview  object  has  been  created.  It uses the
  50.                 following custom message structure:
  51.  
  52.                 struct lvmAddEntries {
  53.                         ULONG              MethodID;  /* LVM_ADDENTRIES */
  54.                         struct GadgetInfo *lvmaGInfo; /* See note above. */
  55.                         APTR              *lvma_Entries;
  56.                         ULONG              lvma_How;
  57.                 };
  58.  
  59.                 lvma_Entries -- This  must point to a NULL-terminated array of
  60.                         pointers to the entries to add.
  61.  
  62.                 lvma_How -- Here  you  can select where the entries are added.
  63.                         The following positions are possible:
  64.  
  65.                         LVAP_HEAD -- The  entries  are added at the top of the
  66.                                 list.
  67.                         LVAP_TAIL -- The  entries  are  added at the bottom of
  68.                                 the list.
  69.                         LVAP_SORTED -- The entries  are added sorted according
  70.                                 to   the   sorting   method  active.   In  the
  71.                                 attributes  section  of this documentation you
  72.                                 can find more about the sorting possibilities.
  73.  
  74.                 This method returns TRUE uppon succes and FALSE if one or more
  75.                 of the entries failed to be added.
  76.  
  77.         LVM_ADDSINGLE -- This  method can be used to add a single entry to the
  78.                 listview  object  after  it  has  been  created.   It uses the
  79.                 following custom message structure:
  80.  
  81.                 struct lvmAddSingle {
  82.                         ULONG              MethodID;   /* LVM_ADDSINGLE */
  83.                         struct GadgetInfo *lvma_GInfo; /* See note above. */
  84.                         APTR               lvma_Entry;
  85.                         ULONG              lvma_How;
  86.                         ULONG              lvma_Flags;
  87.                 };
  88.  
  89.                 lvma_Entry -- This  must  point to the entry which needs to be
  90.                         added to the listview object.
  91.  
  92.                 lvma_How -- Please  refer  to  the  LVM_ADDENTRIES section for
  93.                         more information on the ways you can add entries.
  94.  
  95.                 lvma_Flags -- Any of the following flags can be set here:
  96.  
  97.                         LVASF_MAKEVISIBLE -- This tell's the lisview object to
  98.                                 scroll  the  list  to  make  the  added  entry
  99.                                 visible.
  100.                         LVASF_SELECT -- This  tell's  the  listview  object to
  101.                                 make the added entry selected. This  will also
  102.                                 automatically  scroll  the  list  to  make the
  103.                                 added entry visible.
  104.  
  105.                 Returns TRUE uppon success, FALSE uppon failure.
  106.  
  107.         LVM_CLEAR -- This  method must be used to clear and delete all entries
  108.                 present in the list.   It  uses  the  following custom message
  109.                 structure:
  110.  
  111.                 struct lvmCommand {
  112.                         ULONG              MethodID;   /* Several */
  113.                         struct GadgetInfo *lvmc_GInfo; /* See note above. */
  114.                 };
  115.  
  116.                 Return code is not defined.
  117.  
  118.         LVM_FIRSTENTRY, LVM_LASTENTRY, LVM_NEXTENTRY, LVM_PREVENTRY --   These
  119.                 methods must be used to itterate  through  all entries  in the
  120.                 listview.    All  these  methods  use  the  following  message
  121.                 structure:
  122.  
  123.                 struct lvmGetEntry {
  124.                         ULONG              MethodID;   /* Any of the above. */
  125.                         APTR               lvmg_Previous;
  126.                         ULONG              lvmg_Flags;
  127.                 };
  128.  
  129.                 lvmg_Previous -- For  the  LVM_FIRSTENTRY  and   LVM_LASTENTRY
  130.                         methods this must be NULL.   For the LVM_NEXTENTRY and
  131.                         LVM_PREVENTRY this should point to the  entry returned
  132.                         by a previous call to any of these methods.
  133.  
  134.                 lvmg_Flags -- Any of the following flags may be set here:
  135.  
  136.                         LVGEF_SELECTED -- The   methods  will  only  scan  for
  137.                                 selected entries when  this bit  is set.   All
  138.                                 non-selected entries will simply be skipped.
  139.  
  140.                 Returns a pointer  to  the  entry or NULL when no more entries
  141.                 are available.
  142.  
  143.                 Example:
  144.  
  145.                 /*
  146.                 **      Scan through all entries in
  147.                 **      the listview gadget starting
  148.                 **      at the first one.
  149.                 **/
  150.                 Object          *listview;
  151.                 APTR             entry;
  152.  
  153.                 /*
  154.                 **      Get first entry.
  155.                 **/
  156.                 if ( entry = (APTR)DoMethod(
  157.                                        listview, LVM_FIRSTENTRY, NULL, 0L )) {
  158.                         /*
  159.                         **      Loop through the rest of the list.
  160.                         **/
  161.                         do {
  162.                                 /*
  163.                                 **      Print the entry...
  164.                                 **/
  165.                                 printf( "Entry = %s\n", entry );
  166.                                 /*
  167.                                 **      Next entry...
  168.                                 **/
  169.                                 entry = (APTR)DoMethod(
  170.                                          listview, LVM_NEXTENTRY, entry, 0L );
  171.                         } while ( entry );
  172.                 }
  173.  
  174.         LVM_REMENTRY -- This method must be used to remove a single entry from
  175.                 the  listview  object.   It  uses the following custom message
  176.                 structure:
  177.  
  178.                 struct lvmRemEntry {
  179.                         ULONG              MethodID;   /* LVM_REMENTRY */
  180.                         struct GadgetInfo *lvmr_GInfo; /* See note above. */
  181.                         APTR               lvmr_Entry;
  182.                 };
  183.  
  184.                 lvmr_Entry -- This must point to the entry you want to remove.
  185.                         This usually is a pointer  returned  to you  by either
  186.                         the  LVM_FIRSTENTRY,  LVM_LASTENTRY,  LVM_NEXTENTRY or
  187.                         LVM_PREVENTRY method.
  188.  
  189.                 Return code is not defined.
  190.  
  191.         LVM_REFRESH -- This method must be used to refresh the listview object
  192.                 after some changes have been made which where not visible.  In
  193.                 some cases it might be usefull to add entries  without passing
  194.                 a GadgetInfo structure along  with the  adding  methods.  This
  195.                 will speed up the adding and you can show the changes when you
  196.                 are done by sending this method to the listview object.
  197.  
  198.                 This method uses the same custom message  structure as defined
  199.                 above at the LVM_CLEAR method.
  200.  
  201.                 Return code is not defined.
  202.  
  203.         LVM_SORT -- Calling  this  method  will force a complete re-sorting of
  204.                 the  entries  in  the  list.   This  can  be  handy  when your
  205.                 comparisson  hook (described  in the  Attributes  section) can
  206.                 handle different kinds of comparissons.
  207.  
  208.                 This method uses the same custom message  structure as defined
  209.                 above at the LVM_CLEAR method.
  210.  
  211.                 Return code is not defined.
  212.  
  213.         LVM_LOCKLIST, LVM_UNLOCKLIST --  These  methods  must  be used to lock
  214.                 or unlock the list contents.   When,  for  example,  you  must
  215.                 change the text of a list entry you should lock  it  using the
  216.                 LVM_LOCKLIST method and when you are done unlock it using  the
  217.                 LVM_UNLOCKLIST method.  This  locking is necessary  while  the
  218.                 list may get referenced while you are doing your changes.
  219.  
  220.                 Both  methods use the same custom message structure as defined
  221.                 above at the LVM_CLEAR method.
  222.  
  223.         LVM_MOVE ** V38 ** -- This  method must be used to move entries in the
  224.                 list. This method uses the following custom message structure:
  225.  
  226.                 struct lvmMove {
  227.                         ULONG              MethodID;       /* LVM_MOVE */
  228.                         struct GadgetInfo *lvmm_GInfo;     /* GadgetInfo */
  229.                         APTR               lvmm_Entry;
  230.                         ULONG              lvmm_Direction;
  231.                 };
  232.  
  233.                 lvmm_Entry -- This can point to the specific entry you want to
  234.                         move. If you specify NULL here the  selected  entry is
  235.                         moved.
  236.  
  237.                 lvmm_Direction -- Here you can specify the direction in  which
  238.                         the entry must be moved.  The following directions are
  239.                         possible:
  240.  
  241.                         LVMOVE_UP     -- Move the entry one place up.
  242.                         LVMOVE_DOWN   -- Move the entry one place down.
  243.                         LVMOVE_TOP    -- Move the entry to the list-top.
  244.                         LVMOVE_BOTTOM -- Move the entry to the list-bottom.
  245.  
  246.                 When the  entry  actually  moved the  class  will  send out  a
  247.                 notification message with the following attributes:
  248.  
  249.                         GA_ID             -- The ID of the object.
  250.                         LISTV_NewPosition -- The  new  numeric position of the
  251.                                 entry.
  252.  
  253.                 Returns TRUE when the entry moved and FALSE if not.
  254.  
  255.         LVM_REPLACE ** V39 ** -- This method allows you to replace an existing
  256.                 entry with another.  This  method  uses  the  following custom
  257.                 message structure:
  258.  
  259.                 struct lvmReplace {
  260.                         ULONG              MethodID;       /* LVM_REPLACE */
  261.                         struct GadgetInfo *lvmr_GInfo;     /* GadgetInfo  */
  262.                         APTR               lvmr_OldEntry;
  263.                         APTR               lvmr_NewEntry;
  264.                 };
  265.  
  266.                 lvmr_OldEntry -- This must be a pointer to the entry  you want
  267.                         to replace.
  268.  
  269.                 lvmr_NewEntry -- This must point to the new  data you  want to
  270.                         replace the old entry by.
  271.  
  272.                 Returns the new eentry uppon success and NULL uppon failure.
  273.  
  274.     CHANGED METHODS
  275.         None.
  276.  
  277. listviewclass/Attributes                              listviewclass/Attributes
  278.  
  279.     NAME
  280.         LISTV_ResourceHook -- ( struct Hook * )
  281.  
  282.     FUNCTION
  283.         To add a hook routine that will build or delete a listview entry.  The
  284.         hook routine will be called as follows:
  285.  
  286.         rc = hookFunc( hook, object, message );
  287.         D0             A0    A2      A1
  288.  
  289.         APTR             rc;
  290.         struct Hook     *hook;
  291.         Object          *object;
  292.         struct lvRender *message;
  293.  
  294.         The message arguments is a pointer to the following data structure:
  295.  
  296.         struct lvResource {
  297.                 UWORD           lvr_Command;
  298.                 APTR            lvr_Entry;
  299.         };
  300.  
  301.         lvr_Command -- This can be LVRC_MAKE which means that the  hook should
  302.                 create an entry or it can be  LVRC_KILL  which  means that the
  303.                 hook must dispose of a previously created entry.
  304.  
  305.         lvr_Entry -- When this is a LVRC_MAKE command  this contains  the data
  306.                 added  to  the  listview  by  one  of  the  adding  methods or
  307.                 attributes.  When  this  is a LVRC_KILL command this points to
  308.                 whatever LVRC_MAKE has created.
  309.  
  310.         The default creating/deletion that is done by the listview expects the
  311.         entries to be simple string pointers.   Internally these  strings  are
  312.         copied to an internal buffer when the entry is created. When the entry
  313.         is disposed of the string copy is simply  de-allocated.   If  you  add
  314.         entries to the listview which are not string pointers  you must supply
  315.         your own resource handling using this attribute.
  316.  
  317.         Example:
  318.  
  319.         /*
  320.         **      This example takes a PubScreenNode as input,
  321.         **      copies the name and adds that to the listview.
  322.         **      Uppon deletion it simply de-allocates the copy
  323.         **      of the string.
  324.         **/
  325.         __saveds __asm APTR
  326.         hookFunc( register __a0 struct Hook       *hook,
  327.                   register __a2 Object            *object,
  328.                   register __a1 struct lvResource *lvr )
  329.         {
  330.             struct PubScreenNode        *psn =
  331.                 ( struct PubScreenNode * )lvr->lvr_Entry;
  332.             UWORD                        len;
  333.             APTR                         rc = NULL;
  334.  
  335.             /*
  336.             **      Built or dispose?
  337.             **/
  338.             switch ( lvr->lvr_Command ) {
  339.                 case    LVRC_MAKE:
  340.                     /*
  341.                     **      Determine string size.
  342.                     **/
  343.                     len = strlen( psn->psn_Node.ln_name ) + 1;
  344.                     /*
  345.                     **      Allocate and copy the string.
  346.                     **/
  347.                     if ( rc = ( APTR )AllocVec( len, MEMF_ANY ))
  348.                         strcpy(( UBYTE * )rc, psn->psn_Node.ln_Name );
  349.                     break;
  350.  
  351.                 case    LVRC_KILL:
  352.                     /*
  353.                     **      Simply de-allocate whats created above.
  354.                     **/
  355.                     FreeVec( lvr->lvr_Entry );
  356.                     break;
  357.             }
  358.             /*
  359.             **      'rc' will be a pointer to the created
  360.             **      string copy or NULL which indicates a
  361.             **      memory error with LVRC_MAKE. If rc is non-NULL
  362.             **      the string is added to the list of entries.
  363.             **/
  364.             return( rc );
  365.         }
  366.  
  367.         The hook must return a pointer to the data created when the command is
  368.         LVRC_MAKE.  When  the  command  is  LVRC_MAKE and NULL is returned the
  369.         entry will not be added to the list.
  370.  
  371.         LVRC_KILL commands do not have a return code defined.
  372.  
  373.         Default is NULL (internal memory handling). Applicability is (I).
  374.  
  375.     SEE ALSO
  376.         LISTV_DisplayHook, LISTV_CompareHook
  377.  
  378.     NAME
  379.         LISTV_DisplayHook -- ( struct Hook * )
  380.  
  381.     FUNCTION
  382.         To add a hook routine that will take care of rendering the entries. In
  383.         some  cases  it  is  necessary  to do your own rendering. This hook is
  384.         called for each entry that needs to be rendered. The hook routine will
  385.         be called as follows:
  386.  
  387.         rc = hookFunc( hook, object, message );
  388.         D0             A0    A2      A1
  389.  
  390.         VOID             rc;     /* No return code defined. */
  391.         struct Hook     *hook;
  392.         Object          *object;
  393.         struct lvRender *message;
  394.  
  395.         The message argument is a pointer to the following data structure:
  396.  
  397.         struct lvRender {
  398.                 struct RastPort     *lvr_RPort;
  399.                 struct DrawInfo     *lvr_DrawInfo;
  400.                 struct Rectangle    *lvr_Bounds;
  401.                 APTR                 lvr_Entry;
  402.                 UWORD                lvr_State;
  403.                 UWORD                lvr_Flags;
  404.         };
  405.  
  406.         lvr_RPort -- This  is a pointer to the RastPort in which the rendering
  407.                 must be done. Please note that the font you must use to render
  408.                 text is already set up for you.  It  is  not  recommendable to
  409.                 use another font than the one set in this RastPort because the
  410.                 height of  the  area  you may render in is setup accoording to
  411.                 this font.
  412.  
  413.         lvr_DrawInfo -- This can point  to a  DrawInfo structure as defined in
  414.                 <intuition/screens.h> in which the necessay  information about
  415.                 the display environment is stored.  Note  that it  is possible
  416.                 that this is NULL. It is not very likely but it is possible.
  417.  
  418.         lvr_Bounds -- This is a struct Rectangle in  which the area you should
  419.                 render in is defined. Do _not_ render outside the given bounds
  420.                 or you will seriously screw up the display!  Also keep in mind
  421.                 that the area you are rendering into is not always cleared. In
  422.                 other words, the area may still show data from  another entry.
  423.                 You must make sure you completely re-render the given bounds.
  424.  
  425.         lvr_Entry -- This  points  to  the  entry  data  as setup by the entry
  426.                 creation hook or the built-in entry creation.
  427.  
  428.         lvr_State -- This  describes  the  state in which to render the entry.
  429.                 The state is one of the following possibilities:
  430.  
  431.                 LVRS_NORMAL -- Normal rendering. Render the entry in a normal,
  432.                         un-selected way.
  433.                 LVRS_SELECTED -- Selected rendering.  Render  the  entry  in a
  434.                         selected way.
  435.                 LVRS_NORMAL_DISABLED -- Normal, disabled rendering. Render the
  436.                         entry in a normal way but  make it  disabled.  This is
  437.                         normally  done  by  ghosting  it  with  a pattern (see
  438.                         below).
  439.                 LVRS_SELECTED_DISABLED -- Selected, disabled rendering. Render
  440.                         the entry is a selected way but make it disabled. This
  441.                         is normally done by ghosting  it with  a  pattern (see
  442.                         below).
  443.  
  444.                 Ghosting the entry is usually done like this:
  445.  
  446.                 struct lvRender         *lvr;
  447.                 UWORD                   *pens = lvr->lvr_DrawInfo->dri_Pens;
  448.                 UWORD                    patt = { 0x2222, 0x8888 };
  449.  
  450.                 SetAPen( lvr->lvr_RPort, pens[ SHADOWPEN ] );
  451.                 SetDrMd( lvr->lvr_RPort, JAM1 );
  452.                 SetAfPt( lvr->lvr_RPort, patt, 1 );
  453.  
  454.                 RectFill( lvr->lvr_RPort, lvr->lvr_Bounds.MinX,
  455.                                           lvr->lvr_Bounds.MinY,
  456.                                           lvr->lvr_Bounds.MaxX,
  457.                                           lvr->lvr_Bounds.MaxY );
  458.  
  459.                 Please keep in mind that, although the above code doesn't show
  460.                 it, the lvr_DrawInfo field can be NULL.
  461.  
  462.         lvr_Flags -- No flags are defined yet.
  463.  
  464.         When this hook is not set the internal rendering  routine will  simply
  465.         render a string which is created in  the  LIST_ResourceHook.  When the
  466.         LISTV_RenderHook routine creates something other than a  simple string
  467.         pointer you must provide a display hook to render the entries.
  468.  
  469.         Most  of  the  time  when  you  add  more  than a simple string to the
  470.         listview  object  the  data  you add is a structure which contains the
  471.         string  and  some  extra  data.  To prevent you from having to write a
  472.         display-hook  to  render the string your hook can also simply return a
  473.         pointer  to  the  string and the listviewclass will render it for you.
  474.         I.E.:
  475.  
  476.         struct myStruct {
  477.                 UBYTE           *string;
  478.                 UWORD            some_more_data;
  479.         };
  480.  
  481.         __saveds __asm hookFunc( register __a0 struct Hook     *hook,
  482.                                  register __a2 Object          *lv_obj,
  483.                                  register __a1 struct lvRender *lvr )
  484.         {
  485.              return((( struct myNode * )lvr->lvr_Entry )->string );
  486.         }
  487.  
  488.         This  hook  will  let the listviewclass dispatcher render the returned
  489.         string  for  you while keeping the extended data available for you. If
  490.         your  hook  returns  NULL  the listviewclass assumes you have done all
  491.         rendering required.
  492.  
  493.         Default is NULL (internal entry rendering). Applicability is (I).
  494.  
  495.     SEE ALSO
  496.         LISTV_ResourceHook, LISTV_CompareHook, LISTV_TitleHook
  497.  
  498.     NAME
  499.         LISTV_CompareHook -- ( struct Hook * )
  500.  
  501.     FUNCTION
  502.         To add a hook routine  that will  compare two  entries with eachother.
  503.         As it is possible  to have  entries  which are  different  from simple
  504.         strings you can perform your own comparison here.  The comparison hook
  505.         is called each time an entry is added  sorted or when  the list is re-
  506.         sorted. The hook routine will be called as follows:
  507.  
  508.         rc = hookFunc( hook, object, message );
  509.         D0             A0    A2      A1
  510.  
  511.         LONG                     rc;
  512.         struct Hook             *hook;
  513.         Object                  *object;
  514.         struct lvCompare        *message;
  515.  
  516.         The message argument is a pointer to the following data structure:
  517.  
  518.         struct lvCompare {
  519.                 APTR            lvc_EntryA;
  520.                 APTR            lvc_EntryB;
  521.         };
  522.  
  523.         lvc_EntryA, lvc_EntryB -- These  are the entries that must be compared
  524.                 to eachother.
  525.  
  526.         The internal comparison routine simple  does a  stricmp()  on the  two
  527.         entry strings.
  528.  
  529.         This hook must return -1 when entry a is smaller than entry b, 0  when
  530.         entry a is equal to entry b and 1 when entry a is bigger than entry b.
  531.  
  532.         Default is NULL (internal comparison routine). Applicability is (I).
  533.  
  534.     SEE ALSO
  535.         LISTV_ResourceHook, LISTV_DisplayHook
  536.  
  537.     NAME
  538.         LISTV_Top -- ( ULONG )
  539.  
  540.     FUNCTION
  541.         Set the top-entry of the visible part of the list. This tag is  mostly
  542.         used by the prop object that is connected to  the listview  but it can
  543.         also  be  controlled by your program. The data of this tag must be the
  544.         number of the node to set at the top of the visible area.
  545.  
  546.         Default is 0. Applicability is (ISGU).
  547.  
  548.     NAME
  549.         LISTV_ListFont -- ( struct TextAttr )
  550.  
  551.     FUNCTION
  552.         To set the font which is used to  render the  entries.  By default the
  553.         font  used  to  render  the  entries is the same font which is used to
  554.         render the object it's label. This font might be proportional. In some
  555.         cases  it might be useful to have a mono-space font for the entries or
  556.         even another proportional font.
  557.  
  558.         Default is NULL. Applicability is (IG)
  559.  
  560.     NAME
  561.         LISTV_ReadOnly -- ( BOOL )
  562.  
  563.     FUNCTION
  564.         To make the listview a read-only object.  Read only objects  have full
  565.         functionality except for the entries which cannot be selected.
  566.  
  567.         Default is FALSE. Applicability is (I).
  568.  
  569.     NAME
  570.         LISTV_MultiSelect -- ( BOOL )
  571.  
  572.     FUNCTION
  573.         To make the listview a multi-selection object. Multi-selection objects
  574.         allow the user to select more than one entry from the list.
  575.  
  576.         Default is FALSE. Applicability is (ISU).
  577.  
  578.     NAME
  579.         LISTV_EntryArray -- ( APTR * )
  580.  
  581.     FUNCTION
  582.         To add a set of entries at initialization time.  The data is a pointer
  583.         to a NULL-terminated array of entries which  need to  be added  to the
  584.         listview object.
  585.  
  586.         Default is NULL. Applicability is (I).
  587.  
  588.     SEE ALSO
  589.         LISTV_SortEntryArray
  590.  
  591.     NAME
  592.         LISTV_SortEntryArray -- ( BOOL )
  593.  
  594.     FUNCTION
  595.         To  sort  the  entries  added  at  object  create time. By default the
  596.         entries  added  with  the LISTV_EntryArray attribute will ocure in the
  597.         list in the same order as they ocure in the array. When this attribute
  598.         is set to TRUE these entries will be sorted.
  599.  
  600.         Default is FALSE. Applicability is (I).
  601.  
  602.     SEE ALSO
  603.         LISTV_EntryArray
  604.  
  605.     NAME
  606.         LISTV_Select, LISTV_SelectMulti ** V39 ** -- ( ULONG )
  607.  
  608.     FUNCTION
  609.         To select an entry in the list. The entry you select will also be made
  610.         visible   in   the   display   area.  The data required is the logical
  611.         number of the entry in the list starting with 0 as the first entry.
  612.  
  613.         The following magic numbers are allowed in the tag it's data field:
  614.  
  615.         LISTV_Select_First    -- Select the first entry. ** V38 **
  616.  
  617.         LISTV_Select_Last     -- Select the last entry. ** V38 **
  618.  
  619.         LISTV_Select_Next     -- Select the next  entry.  If there is no entry
  620.                 selected yet the first visible entry is selected. ** V38 **
  621.  
  622.         LISTV_Select_Previous -- Select  the  previous entry.   If there is no
  623.                 selected  entry  yet  the  first  visible  entry  is selected.
  624.                 ** V38 **
  625.  
  626.         LISTV_Select_Top      -- Select the first visible entry. ** V38 **
  627.  
  628.         LISTV_Select_Page_Up  -- Select the entry one page above  the current.
  629.                 If the currently selected entry is not the  top-entry  the top
  630.                 entry will be selected. Otherwise the entry one-page up  minus
  631.                 one is selected. When no entry is selected the  first  visible
  632.                 entry is selected. ** V38 **
  633.  
  634.         LISTV_Select_Page_Down -- Select the entry one page below the current.
  635.                 If the currently selected entry is not the   bottom-entry  the
  636.                 bottom entry will be selected.  Otherwise  the  entry one-page
  637.                 down minus one is selected.  When  no  entry  is  selected the
  638.                 first visible entry is selected. ** V38 **
  639.  
  640.         LISTV_Select_All -- Selects all entries in the list.  Please note that
  641.                 this  magic  number  will  only  work  on  listviews in multi-
  642.                 selection   mode   and   it   will   only   work   with   the
  643.                 LISTV_SelectMulti and LISTV_SelectMultiNotVisible  attributes.
  644.                 ** V39 **
  645.  
  646.         LISTV_SelectMulti  will  select  the  entry  without  deselecting  any
  647.         previous selected items while LISTV_Select will deselect  any previous
  648.         selections.
  649.  
  650.         Applicability is (SU).
  651.  
  652.     SEE ALSO
  653.         LISTV_SelectNotVisible, LISTV_SelectMultiNotVisible
  654.  
  655.     NAME
  656.         LISTV_MakeVisible -- ( ULONG )
  657.  
  658.     FUNCTION
  659.         To scroll the list to make the entry appear in the display area of the
  660.         listview object. The data required is the logical number of  the entry
  661.         in the list starting with 0 as the first entry.
  662.  
  663.         Applicability is (SU).
  664.  
  665.     NAME
  666.         LISTV_Entry -- ( APTR )
  667.  
  668.     FUNCTION
  669.         This  tag  is sent during notification. The data field is a pointer to
  670.         the entry which triggered the notification.
  671.  
  672.         Applicability is (N).
  673.  
  674.     SEE ALSO
  675.         LISTV_EntryNumber
  676.  
  677.     NAME
  678.         LISTV_EntryNumber -- ( ULONG )
  679.  
  680.     FUNCTION
  681.         This  tag  is  sent during notification. The data field is the logical
  682.         number of the entry which triggered the notification.
  683.  
  684.         Applicability is (N).
  685.  
  686.     SEE ALSO
  687.         LISTV_Entry
  688.  
  689.     NAME
  690.         LISTV_LastClicked -- ( APTR )
  691.  
  692.     FUNCTION
  693.         To get a pointer to the last selected entry.  This data can be used to
  694.         detect double-clicking and entry.
  695.  
  696.         Example:
  697.  
  698.         Object          *listview;
  699.         ULONG            ds[2], dm[2], last = 0, clicked;
  700.  
  701.         GetAttr( LISTV_LastClicked, listview, &clicked );
  702.         if ( clicked == last ) {
  703.                 CurrentTime( &ds[ 1 ], &dm[ 1 ] );
  704.                 if ( DoubleClick( ds[ 0 ], dm[ 0 ], ds[ 1 ], dm [ 1 ] )) {
  705.                         /* Double clicked */
  706.                         ...
  707.                 }
  708.         }
  709.         CurrentTime( &ds[ 0 ], &dm[ 0 ] );
  710.         last = clicked;
  711.  
  712.         Applicability is (G).
  713.  
  714.     SEE ALSO
  715.         LISTV_LastClickedNum
  716.  
  717.     NAME
  718.         LISTV_TitleHook -- ( struct Hook * )
  719.  
  720.     FUNCTION
  721.         To  add  a hook to render a title for the list. Multi-column listviews
  722.         normally  have  a  title  entry which is rendered in the list area but
  723.         does  not scroll with the list. To support multi-column listviews this
  724.         hook can be defined which will keep room for a single entry at the top
  725.         of the list area which is reserved for this purpose.  The hook routine
  726.         is  called  exactly the same as the LISTV_DisplayHook routine with the
  727.         exception  that  the  lvr_Entry  field  of the lvRender structure will
  728.         contain a NULL pointer.
  729.  
  730.         Default is NULL (no title). Applicability is (I).
  731.  
  732.     NAME
  733.         LISTV_ThinFrames -- ( BOOL )
  734.  
  735.     FUNCTION
  736.         To make  all  listview object framing appear as thin frames. This will
  737.         help you to make an aspect-ratio dependant GUI.
  738.  
  739.         Default is FALSE. Applicability is (I).
  740.  
  741.     NAME
  742.         PGA_NewLook -- ( BOOL )
  743.  
  744.     FUNCTION
  745.         To make the scroller of the listview gadget appear in the new look.
  746.  
  747.         Default is FALSE. Applicability is (I).
  748.  
  749.     NAME
  750.         LISTV_LastClickedNum -- ( ULONG ) ** V38 **
  751.  
  752.     FUNCTION
  753.         To return the number of the last selected entry.
  754.  
  755.         Applicability is (G).
  756.  
  757.     SEE ALSO
  758.         LISTV_LastClicked
  759.  
  760.     NAME
  761.         LISTV_NumEntries ( ULONG ) ** V38 **
  762.  
  763.     FUNCTION
  764.         To return the number of entries in the list.
  765.  
  766.         Applicability is (G).
  767.  
  768.     NAME
  769.         LISTV_NewPosition -- ( ULONG ) ** V38 **
  770.  
  771.     FUNCTION
  772.         To  notify  the  object  it's  targets  of the entry it's new position
  773.         number.   When  you  move an entry with the LVM_MOVE method the object
  774.         will send out a notification message with this attribute.
  775.  
  776.         Applicability is (N).
  777.  
  778.     SEE ALSO
  779.         LVM_MOVE
  780.  
  781.     NAME
  782.         LISTV_MinEntriesShown -- ( UWORD )
  783.  
  784.     FUNCTION
  785.         To specify how many entries should be visible at all times.  Note: The
  786.         larger this value the bigger the object it's minimum size.
  787.  
  788.         Default is 3. Applicability is (I).
  789.  
  790.     NAME
  791.         LISTV_SelectNotVisible, LISTV_SelectMultiNotVisible -- ( ULONG )
  792.         ** V39 **
  793.  
  794.     FUNCTION
  795.         To select an entry in the list.  This attribute works exactly like the
  796.         LISTV_Select and LISTV_SelectMulti attributes with the exception  that
  797.         the  selected  entry  is  not  moved into the current view area of the
  798.         list.
  799.  
  800.         Applicability is (SU).
  801.  
  802.     SEE ALSO
  803.         LIST_Select, LISTV_SelectMulti
  804.  
  805.     NAME
  806.         LISTV_MultiSelectNoShift -- ( BOOL ) ** V39 **
  807.  
  808.     FUNCTION
  809.         To allow the user to multi-(de)select the entries in a multi-selection
  810.         object  without  having  to use the SHIFT key. This tag is only useful
  811.         when the LISTV_MultiSelect tag is set to TRUE.
  812.  
  813.         Default is FALSE. Applicability is (ISU).
  814.  
  815.    SEE ALSO
  816.         LISTV_MultiSelect
  817.  
  818.    NAME
  819.         LISTV_DeSelect -- ( ULONG ) ** V39 **
  820.  
  821.    FUNCTION
  822.         To deselect a selected entry. The data you pass is the ordinal  number
  823.         of the entry starting at 0 for the  first  entry in the list.  If  you
  824.         supply  a  value  of  ~0  (-1) all  selected  entries  in the list are
  825.         deselected.
  826.  
  827.    SEE ALSO
  828.         LISTV_Select
  829.